package com.kedacom.testlego.model.bean;


import java.io.File;

/**
 * 作者: Anthony.Pan
 * 邮箱: panshengquan@kedacom.com
 * 日期: 2019/4/30 22:40
 */
public class ApiRequestBody {

    public static final String CATEGORY = "codesList";

    public static final String CHECK_ID_CARD_NUM = "cardNum";

    public static final String USER_NAME = "userName";

    public static final String USER_CARD_NUM = "userCardNum";

    public static final String USER_DPT_CODE = "userDepartmentCode";

    public static final String USER_DPT_NAME = "userDepartmentName";

    public static final String DEVICE_ID = "deviceId";

    public static final String CHECK_PHOTO_FILE = "file";

    public static final String PERSON_NAME = "personName";
    public static final String PERSON_BIRTH = "personBirth";
    public static final String PERSON_SEX = "personSex";

    /**
     * 查询库
     */
    private String[] codesList;
    /**
     * 被查人身份证号码,智协对该字段做必传处理，
     * 尤其是人脸图片比对时也需要传入被查身份证号
     */
    private String cardNum;
    /**
     * 查询人名字
     */
    private String userName;
    /**
     * 查询人身份证号码
     */
    private String userCardNum;

    /**
     * 查询人部门代码
     */
    private String userDepartmentCode;

    /**
     * 查询人部门名称
     */
    private String userDepartmentName;

    /**
     * 设备编号
     */
    private String deviceId;

    /**
     * 被查询人头像文件
     */
    private File file;

    /**
     * 人员姓名
     */
    private String personName;
    /**
     * 人员出生日期
     */
    private String personBirth;
    /**
     * 人员性别
     */
    private String personSex;
    /**
     * App校验 (注册索要)
     */
    private String appId;

    /**
     * ------------------扫苏城码请求字段------------------------
     * appKey: 0905534733
     * secretKey: 50KJOetMCpMoGGO6
     * 加密的二维码:APP服务端将扫描的二维码值通过AES(AES/ECB/PKCS5Padding)加密,使用秘钥secretKey
     */
    private String appKey;

    private String qrCode;

    private ApiRequestBody(Builder builder) {
        setCodesList(builder.codesList);
        setCardNum(builder.cardNum);
        setUserName(builder.userName);
        setUserCardNum(builder.userCardNum);
        setUserDepartmentCode(builder.userDepartmentCode);
        setUserDepartmentName(builder.userDepartmentName);
        setDeviceId(builder.deviceId);
        setFile(builder.file);
        setPersonName(builder.personName);
        setPersonBirth(builder.personBirth);
        setPersonSex(builder.personSex);
        setAppId(builder.appId);
        setAppKey(builder.appKey);
        setQrCode(builder.qrCode);
    }

    public String[] getCodesList() {
        return codesList;
    }

    public void setCodesList(String[] codesList) {
        this.codesList = codesList;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserCardNum() {
        return userCardNum;
    }

    public void setUserCardNum(String userCardNum) {
        this.userCardNum = userCardNum;
    }

    public String getUserDepartmentCode() {
        return userDepartmentCode;
    }

    public void setUserDepartmentCode(String userDepartmentCode) {
        this.userDepartmentCode = userDepartmentCode;
    }

    public String getUserDepartmentName() {
        return userDepartmentName;
    }

    public void setUserDepartmentName(String userDepartmentName) {
        this.userDepartmentName = userDepartmentName;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public void setPersonBirth(String personBirth) {
        this.personBirth = personBirth;
    }

    public void setPersonSex(String personSex) {
        this.personSex = personSex;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public static final class Builder {
        private String[] codesList;
        private String cardNum;
        private String userName;
        private String userCardNum;
        private String userDepartmentCode;
        private String userDepartmentName;
        private String deviceId;
        private File file;
        private String personName;
        private String personBirth;
        private String personSex;
        private String appId;
        private String appKey;
        private String qrCode;

        public Builder() {
        }

        public Builder codesList(String[] val) {
            codesList = val;
            return this;
        }

        public Builder cardNum(String val) {
            cardNum = val;
            return this;
        }

        public Builder userName(String val) {
            userName = val;
            return this;
        }

        public Builder userCardNum(String val) {
            userCardNum = val;
            return this;
        }

        public Builder userDepartmentCode(String val) {
            userDepartmentCode = val;
            return this;
        }

        public Builder userDepartmentName(String val) {
            userDepartmentName = val;
            return this;
        }

        public Builder deviceId(String val) {
            deviceId = val;
            return this;
        }

        public Builder file(File val) {
            file = val;
            return this;
        }

        public Builder personName(String personName) {
            this.personName = personName;
            return this;
        }

        public Builder personBirth(String personBirth) {
            this.personBirth = personBirth;
            return this;
        }

        public Builder personSex(String personSex) {
            this.personSex = personSex;
            return this;
        }

        public Builder appId(String appId) {
            this.appId = appId;
            return this;
        }

        public Builder appKey(String appKey) {
            this.appKey = appKey;
            return this;
        }

        public Builder qrCode(String qrCode) {
            this.qrCode = qrCode;
            return this;
        }


        public ApiRequestBody build() {
            return new ApiRequestBody(this);
        }
    }
}
